-- GENERATED SPELL FOR [Warlord Thresh'jin] --


function spell0_10822(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10822', 10326, 1)
end

function spell1_10822(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(11971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10822', 30286, 1)
end

function spell2_10822(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_10822', 580, 1)
end

function spell3_10822(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_10822', 2000, 1)
end

function Sorts_10822(pUnit, Event)
local choix_sorts_10822 = math.random(0, 3)
if choix_sorts_10822 == 0 then
pUnit:RegisterEvent('spell0_10822', 1, 1)
end
if choix_sorts_10822 == 1 then
pUnit:RegisterEvent('spell1_10822', 1, 1)
end
if choix_sorts_10822 == 2 then
pUnit:RegisterEvent('spell2_10822', 1, 1)
end
if choix_sorts_10822 == 3 then
pUnit:RegisterEvent('spell3_10822', 1, 1)
end
end

function mob10822_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10822', math.random(1500, 3000), 1)
end

function mob10822_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10822_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10822_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10822, 1, 'mob10822_Action')
RegisterUnitEvent(10822, 2, 'mob10822_Leave')
RegisterUnitEvent(10822, 3, 'mob10822_Kill')
RegisterUnitEvent(10822, 4, 'mob10822_Die')
